﻿@{
    ViewBag.Title = "绑定";
}
<!DOCTYPE html>
<html lang="en" class="validate-html">
<head>
    <meta charset="utf-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">

    <script src="~/Content/wechat/js/flexible.debug.js"></script>
    @*<script src="js/flexible.debug.js"></script>*@
    @*<link rel="stylesheet" href="~/ css/phone-account-h5.css">*@
    <link href="~/Content/wechat/css/phone-account-h5.css" rel="stylesheet" />

    <link rel="apple-touch-icon" href="favicon.png">
    <link rel="Shortcut Icon" href="favicon.png" type="image/x-icon">
    <title>验证</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>

    <link href="~/Content/layer/skin/layer.css" rel="stylesheet" />
    <script src="~/Content/layer/layer.js"></script>
    <style>
        /*html,body{
            height: 100vh;
        }*/
    </style>
    <script type="text/javascript">
        $(function () {
            debugger;

            var oppid = "@ViewData["openid"]";

            $('#ok').click(function () {
                debugger
                var name = $("#userName").val();
                if (name == '' || name.length <= 5 || name.length >= 50) {
                    layer.msg('请输入正确手机号码或企业邮箱');
                    return false;
                }
                $.ajax({
                    type: "Post",
                    url: "/WeiXin/Binding",
                    data: { userName: name, openid: oppid },
                    dataType: "json",
                    success: function (data) {
                        debugger
                        if (data.success) {
                            layer.msg('验证成功');
                            window.location.href = "/WeiXin/OAuthSnsApiUserInfo"
                        } else {
                            layer.msg('验证失败');
                        }
                    },
                    error: function (data) {
                        layer.msg('验证失败');
                    }
                });
            });
        });
    </script>
</head>
<body>
    <!-- 页面结构写在这里 -->
    <div class="validate-bg">
        <header>
            <h1>手机号或企业邮箱： </h1>
        </header>
        <div class="content">
            <div class="input-ct">
                <input type="text" id="userName" class="contact-input">
                @*<input type="text" id="openid" value="" class="contact-input">*@
            </div>
            <div class="tip">仅供集团员工内部登录使用，可通过手机号或企业邮箱进行验证。</div>
            <div class="btn-ct">
                <input type="button" id="ok" value="验证" class="validate-btn">
            </div>
        </div>
    </div>
    @*<div class="validate-msg">员工档案信息不匹配</div>*@
    @*<div class="pop-panel-mask">
            <div class="pop-panel">
                <div class="img-ct">
                    <img class="yesIcon" src="~/Content/wechat/img/phone-img/yes-icon.png">
                </div>
                <div class="success">通过验证</div>
                <div class="btn-ct">
                    <input type="button" value="我知道了" class="sure-btn">
                </div>
            </div>
        </div>*@
</body>
</html>